import QtQuick 1.0

Rectangle {
    id: ouroborosBackground

    anchors.fill: parent
    color: "black"

    opacity: 0.8

    onOpacityChanged: {
        if (opacity == 0)
            ouroborosBackground.destroy();
    }

    Image {
        source: "res/img/ouroboros.png"
        anchors.centerIn: parent
        z: 1000

        id: ouroboros

        scale: 0.3
        rotation: 270

        opacity: 0.8

        SequentialAnimation {
            running: true

            ParallelAnimation {
                NumberAnimation { target: ouroboros; property: "scale"; to: 1; duration: 300 }
                NumberAnimation { target: ouroboros; property: "rotation"; to: 360; duration: 300 }
            }

            NumberAnimation { target: ouroboros; property: "opacity"; to: 0; duration: 300 }
            NumberAnimation { target: ouroborosBackground; property: "opacity"; to: 0; duration: 300 }
        }
    }

}
